﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AntiObesity.Utilities.Wire
{
    public enum DataType
    {
        Date,
        Number,
        String
    }

    public static class DataTypeExtensions
    {
        public static string toJSON(this DataType source)
        {
            switch (source)
            {
                case DataType.Date:
                    return "date";
                case DataType.Number:
                    return "number";
                case DataType.String:
                    return "string";
                default:
                    throw new Exception("Unknown DataType");
            }
        }
    }
}
